/**
 * 埋点追踪模块
 */

'use strict'

const Controller = require('egg').Controller

class TrackingController extends Controller {
  async getTrackingList() {
    const { ctx } = this
    const resBody = await ctx.service.eventTracking.getTrackingList(ctx.query)
    ctx.body = resBody
  }
  async createTracking() {
    const { ctx } = this
    const resBody = await ctx.service.eventTracking.createTracking(
      ctx.request.body
    )
    ctx.body = resBody
  }
  async deleteTracking() {
    const { ctx } = this
    const resBody = await ctx.service.eventTracking.deleteTracking(
      ctx.params.id
    )
    ctx.body = resBody
  }
}

module.exports = TrackingController
